<?php
		$iID=$_POST['iID'];
		$idishID=$_POST['idishID'];
		$ishopID=$_POST['ishopID'];
		$iuserID=$_POST['iuserID'];
		$iamount=$_POST['iamount'];
		$itotal=$_POST['itotal'];
		$istatus=$_POST['istatus'];
		$servername = "127.0.0.1";
		$username = "root";
		$password = "";
		$dbname = "OnlineDeliverOrderSystem_schema";
		// 创建连接
		$conn = new mysqli($servername, $username, $password, $dbname);
		// 检测连接
		if ($conn->connect_error) {
		    die("连接失败: " . $conn->connect_error);
		}
		
		$insertSql = sprintf("INSERT INTO `onlinedeliverordersystem_schema`.`order` (`ID`, `dishID`, `shopID`, `userID`, `amount`, `total`, `status`) VALUES ('%s', '%s', '%s', '%s', '%d', '%f', '%s')",$iID,$idishID,$ishopID,$iuserID,$iamount,$itotal,$istatus);
			
		if ($conn->query($insertSql) === TRUE) {
		    echo 0;//注册成功
		} else {
		    echo 1;//注册失败
		}
		
		$conn->close();
?>